<?php

require_once 'uni-sdk/src/Common/Uni.php';
require_once 'uni-sdk/src/Common/UniException.php';
require_once 'uni-sdk/src/Common/UniResponse.php';
require_once 'uni-sdk/src/SMS/UniSMS.php';

use Uni\Common\UniException;
use Uni\SMS\UniSMS;

// 初始化
$client = new UniSMS([
    'accessKeyId' => 'QSEuuLCLzbSpWeXn5FC4sqivio7YT5fVQTFVSYw1unJvqqWue',
    //'accessKeySecret' => 'your access key secret' // 若使用简易验签模式请删除此行
]);

// 发送短信
try {
    $resp = $client->send([
        'to' => '13535350765',
        'signature' => '友趣UQU',
        'templateId' => '5aab87a0',
        'templateData' => [
            'name' => 'john',
            'type' => '飞盘'
        ]
    ]);
    var_dump($resp->data);
} catch (UniException $e) {
    print_r($e);
}

